package b2.widget.status
{
	import b2.player.StatusInfo;
	import b2.player.Status;
	import b2.widget.status.icon.FriendStatus;
	import b2.widget.status.icon.LoginStatus;
	
	public class IconFactory
	{
		
		public function IconFactory()
		{
			
		}

		public static function createIcon(statusInfo:StatusInfo):StatusIcon
		{
			if (statusInfo.statusIndex == Status.FRIENDS)
				return new FriendStatus(statusInfo);
			else if (statusInfo.statusIndex == Status.LOGIN)
				return new LoginStatus(statusInfo);
			else
				return new StatusIcon(statusInfo);
		}
	}
}